"How to organize multiblocks? like tetris? yes!
"	need more interacitons between blocks/snakes
"More zoom levels?
"Much later: avatars

au!
au BufRead *.map call InitMapFile()
au Bufwrite *.map call WriteMapFile()

fun! InitMapFile()
	if !search('^DATA')|echoe 'DATA !found'|retu|en
	let g:NxtIx=0+getline(line('.')+1)
	let g:posAy=getline(line('.')+2,line('$'))
	call map(g:posAy,'split(v:val)')
	nn i :call MpKi(nrchar(getchar()) 
    nn x x:call MpKx()
	nn p :call MpKp()
endfun
fun! WriteMapFile()
	if !search('^DATA')|echoe 'DATA !found'|retu
	endif
	norm! jdG
	for i in g:posAy
		exe 'norm! i<CR>'.join(i)
	endfor
endfun

fun! MpKi(lbl)
	exe 'norm! i'.lbl
	if len(posAy[line('.')]) >= col(['.']-1)
   		call insert(posAy[line('.')],g:NxtIx,col(['.'])-1)
	else
		let posAy[line('.')]=posAy[line('.')]
		\ +repeat([0],col(['.'])-posAy[line('.')])+[g:NxtIx]
	en
	let g:NxtIx+=1
endfun
fun! MpKx()
	let g:cutbk=remove(posAy[line('.')],col(['.]))
	let g:cutlbl=@"
endfun
fun! MpKp()
	exe 'norm! i'.g:cutlbl
   	call insert(posAy[line('.')],g:cutbk,col(['.']))
endfun
